
URL = 'https://pgykeji.com'
// URL2 = 'http://192.168.1.3:8080'
const actions = {
  getAddrTreeCascade: function (data, success, fail) {
    let request = require('request')
    let url = URL + '/api/dict/addr/cascade'
    request.request(url, data, success, fail)
  },
  getCategoryTree: function (data, success, fail) {
    let request = require('request')
    let url = URL + '/api/dict/cat/tree'
    request.request(url, data, success, fail)
  },
  getTopCatAndSvrs: function (data, success, fail) {
    let request = require('request')
    let url = URL + '/api/dict/cat/svr/tree'
    request.request(url, data, success, fail)
  },
  getServices: function (data, success, fail) {
    let request = require('request')
    let url = URL + '/api/dict/cat/list'
    request.request(url, data,success,fail)
  },
  getServicesType: function (data, success, fail){
    let request = require('request')
    let url = URL + '/api/dict/svr/list'
    request.request(url, data, success, fail)
  },
  getCat: function (data, success, fail){
    let request = require('request')
    let url = URL + '/api/dict/cat/list'
    request.request(url, data, success, fail)
  },
  getAddress: function (data, success, fail) {
    let request = require('request')
    let url = URL + '/api/dict/addr/list'
    request.request(url, data, success, fail)
  },
  getExpress: function (data, success, fail) {
    let request = require('request')
    let url = URL + '/api/dict/expr/com/list'
    request.request(url, data, success, fail)
  },
  createOrder: function (data, success, fail){
    let request = require('request')
    let url = URL + '/api/user/order/create'
    // let url = URL2 + '/api/user/order/create'
    request.request(url, data, success, fail)
  },
  searchByMobile: function (data, success, fail) {
    let request = require('request')
    let url = URL + '/api/user/order/query/mobile/processing'
    request.request(url, data, success, fail)
  },
  searchByOrderNo: function (data, success, fail) {
    let request = require('request')
    let url = URL + '/api/user/order/detail'
    request.request(url, data, success, fail)
  }
}

module.exports = actions